package com.lvcoding.auth2.auth.shizhan.verifycode.img;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lvcoding.auth2.auth.shizhan.verifycode.parent.VerifyCode;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.awt.image.BufferedImage;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
public class ImgCode extends VerifyCode {

    @JsonIgnore
    private BufferedImage image;

    public ImgCode(String code, BufferedImage image, int expire) {
        super(code, LocalDateTime.now().plusMinutes(expire));
        this.image = image;
    }
}
